﻿@{
    ViewBag.Title = "Index";
    ViewBag.Title = "材料查看首页";
}
<style type="text/css">
    div .div_rmenu {
        background-color: #555555;
        text-align: left;
        padding: 2px;
    }

        div .div_rmenu li {
            list-style: none;
        }

        div .div_rmenu ul {
            margin: 1px 0;
            padding: 0 5px;
            cursor: pointer;
            list-style: none outside none;
            background-color: #DFDFDF;
        }

            div .div_rmenu ul:hover {
                background-color: #b8d0d6;
            }

            div .div_rmenu ul li {
                margin: 0;
                padding: 2px 0;
            }

    .ztree .span1 {
        color: #0a9c1d;
    }

    .ztree .span2 {
        color: #ff6a00;
    }

    .ztree .span3 {
        color: #0026ff;
    }
</style>
<script type="text/javascript">
    var jgzl_clck_zTree;
    var jgzl_clck_zTree_setting = {
        treeObjId: "jgzl_clck_zTre",
        isSimpleData: true,              //数据是否采用简单 Array 格式，默认false
        treeNodeKey: "id",               //在isSimpleData格式下，当前节点id属性
        treeNodeParentKey: "pId",        //在isSimpleData格式下，当前节点的父节点id属性
        showLine: true,                  //是否显示节点间的连线
        checkable: false,                  //每个节点上是否显示 CheckBox
        async: true,
        asyncUrl: "/CompletionMaterials/ProFile/ProFileTypeJson",  //获取节点数据的URL地址
        asyncParam: ["id"],
        callback: {
            click: jgzl_clck_zTree_click
        }
    };
    //点击事件
    function jgzl_clck_zTree_click(event, treeId, treeNode) {
        var tab_i = 0;
        if ($("#ul_profile").length > 0) {
            var i = 0;
            $("#ul_profile li").each(function () {
                if ($(this).attr("class") == "selected") {
                    tab_i = i;
                }
                i++;
            });
        }
        $("#jgzl_clck_list").loadUrl('/CompletionMaterials/ProFile/Detail', "tab_i=" + tab_i + "&id=" + treeNode.id, function (message) {
            $('#jgzl_clck_list').parent().find("[layoutH]").layoutH();
        });
    }
    //初始化
    $(document).ready(function () {
        $.getJSON(
         "/CompletionMaterials/ProFile/ProFileTypeJson",
           function (data) {
               jgzl_clck_zTree = $("#jgzl_clck_zTree").zTree(jgzl_clck_zTree_setting, data);
               if (data.length > 0) {
                   $("#jgzl_clck_list").loadUrl('/CompletionMaterials/ProFile/Detail', "tab_i=0&id=" + data[0].id, function (message) {
                       $('#jgzl_clck_list').parent().find("[layoutH]").layoutH();
                   });
               }
           });
    });
</script>


<div class="page" style="border-top: 1px solid #b8d0d6;" layouth="1">
    <div class="leftPanel" style="width: 300px;">
        <div class="panelBar" style="width: 298px;">
            <ul style="width: 160px;">
                <li class="ztree">(<span class="span1">归档文件</span>/<span class="span2">归档案卷</span>)</li>
            </ul>
        </div>
        <div class="pageContent" layouth="28">
            <ul id="jgzl_clck_zTree" class="ztree"></ul>
        </div>
    </div>
    <div id="jgzl_clck_list" class="rightPanel">
    </div>
</div>

